
/*
 *
 *  Copyright (C) 2012-2024
 *  All rights reserved, Designed By 杭州连线客信息技术有限公司
 *  注意：
 *  本软件为杭州连线客信息技术有限公司开发研制，未经购买不得使用
 *  购买后可获得全部源代码（禁止转卖、分享、上传到码云、github等开源平台）
 *  一经发现盗用、分享等行为，将追究法律责任，后果自负
 *
 */

package com.lxk.oms.postorder.domain.bo;

import com.lxk.oms.postorder.domain.OmsPostOrder;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.mybatis.core.domain.BaseEntity;

import java.math.BigDecimal;

/**
 * 订单售后业务对象 oms_post_order
 *
 * @author LXK-RY5
 * @date 2024-09-28
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = OmsPostOrder.class, reverseConvertGenerate = false)
public class OmsPostOrderBo extends BaseEntity {

    /**
     * ID
     */
    @NotNull(message = "ID不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 商户id
     */
    @NotNull(message = "商户id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long merId;

    /**
     * 售后订单编号
     */
    @NotBlank(message = "售后订单编号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String postOrderNo;

    /**
     * 售后类型 0=退款  10=退款退货 20=换货
     */
    @NotNull(message = "售后类型 0=退款  10=退款退货 20=换货不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer postType;

    /**
     * 订单主键id
     */
    @NotNull(message = "订单主键id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long orderId;

    /**
     * 订单编号
     */
    @NotBlank(message = "订单编号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String orderSn;

    /**
     * 订单类型
     */
    @NotNull(message = "订单类型不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer orderType;

    /**
     * 用户ID
     */
    @NotNull(message = "用户ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long userId;

    /**
     * 用户下单IP
     */
    @NotBlank(message = "用户下单IP不能为空", groups = { AddGroup.class, EditGroup.class })
    private String userIp;

    /**
     * 申请原因
     */
    @NotBlank(message = "申请原因不能为空", groups = { AddGroup.class, EditGroup.class })
    private String reasons;

    /**
     * 说明
     */
    @NotBlank(message = "说明不能为空", groups = { AddGroup.class, EditGroup.class })
    private String explains;

    /**
     * 说明图片->多个用逗号分割
     */
//    @NotBlank(message = "说明图片->多个用逗号分割不能为空", groups = { AddGroup.class, EditGroup.class })
    private String explainImg;

    /**
     * 状态 0=未售后 1=待审核 10=待退货 20=待换货  25=换货中 30=待退款   40=已完成  100=审核不通过
退款状态：待退款=》已完成
退货状态：待审核=》待退货=》待退款=》已完成
换货状态：待审核=》待退货=》待换货=》换货中=》已完成
     */
    private Integer status;

    /**
     * 原始退款金额
     */
    @NotNull(message = "原始退款金额不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal refundAmount;

    /**
     * 实际退款金额
     */
    @NotNull(message = "实际退款金额不能为空", groups = {AddGroup.class, EditGroup.class})
    private BigDecimal actRefundAmount;

    /**
     * 售后数量
     */
    @NotNull(message = "售后数量不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer refundCount;

    /**
     * 商户的退款订单号
     */
    private String outRefundNo;


    /**
     * 货物状态 0=已收到货1=未收到货
     */
    private Integer goodStatus;
}
